import 'dart:ui';

import 'package:flutter/material.dart';

// 毛玻璃层
class XinDongCommonBurnLayer extends StatelessWidget {
  final Color? color;
  final double sigma;
  final double opacity;

  // 构造函数
  const XinDongCommonBurnLayer({Key? key, this.color, this.sigma = 10, this.opacity = 0.7}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ClipRect(
      child: BackdropFilter(
        filter: ImageFilter.blur(sigmaX: sigma, sigmaY: sigma),
        child: Opacity(
          opacity: opacity,
          child: Container(color: color ?? Colors.grey.shade600),
        ),
      ),
    );
  }
}
